POV-Ray : Newsgroups : povray.off-topic : Binary trees, branches and leaves : Binary trees, branches and leaves Server Time
4 Sep 2024 09:17:21 EDT (-0400)
  Binary trees, branches and leaves  
From: Darren New
Date: 4 Mar 2010 11:27:15
Message: <4b8fdf63$1@news.povray.org>
I can't find the thread that was talking about trees in Haskell vs trees in 
an OO language, but...

I realized why I thought trees in an OO language have child nodes with null 
branches - It's OO. You have pointers to things. In Haskell, it's expected 
that when you add a new leaf down at the bottom of the tree, the root node 
changes. In OO, you don't want to have to reassign all variables holding 
pointers to the root when you add a leaf. And that applies recursively as 
well. Even balancing a tree, you tend to rotate the child pointers rather 
than reassign the parent pointer, per se.

So that's at least part of it.

-- 
Darren New, San Diego CA, USA (PST)
   The question in today's corporate environment is not
   so much "what color is your parachute?" as it is
   "what color is your nose?"


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.